home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / include / amiga20 / clib / graphics_protos.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-01-11  |  9.9 KB  |  227 lines

  1. #ifndef  CLIB_GRAPHICS_PROTOS_H
  2. #define  CLIB_GRAPHICS_PROTOS_H
  3. /*
  4. **    $Filename: clib/graphics_protos.h $
  5. **    $Release: 2.04 $
  6. **    $Revision: 30.156 $
  7. **    $Date: 1995/01/11 05:18:09 $
  8. **
  9. **    C prototypes. For use with 32 bit integers only.
  10. **
  11. **    (C) Copyright 1990 Commodore-Amiga, Inc.
  12. **        All Rights Reserved
  13. */
  14. /* "graphics.library" */
  15. #ifndef  GRAPHICS_GFX_H
  16. #include <graphics/gfx.h>
  17. #endif
  18. #ifndef  GRAPHICS_DISPLAYINFO_H
  19. #include <graphics/displayinfo.h>
  20. #endif
  21. #ifndef  GRAPHICS_GELS_H
  22. #include <graphics/gels.h>
  23. #endif
  24. #ifndef  GRAPHICS_RASTPORT_H
  25. #include <graphics/rastport.h>
  26. #endif
  27. #ifndef  GRAPHICS_VIEW_H
  28. #include <graphics/view.h>
  29. #endif
  30. #ifndef  GRAPHICS_COPPER_H
  31. #include <graphics/copper.h>
  32. #endif
  33. #ifndef  GRAPHICS_CLIP_H
  34. #include <graphics/clip.h>
  35. #endif
  36. #ifndef  GRAPHICS_REGIONS_H
  37. #include <graphics/regions.h>
  38. #endif
  39. #ifndef  GRAPHICS_SPRITE_H
  40. #include <graphics/sprite.h>
  41. #endif
  42. #ifndef  GRAPHICS_TEXT_H
  43. #include <graphics/text.h>
  44. #endif
  45. #ifndef  HARDWARE_BLIT_H
  46. #include <hardware/blit.h>
  47. #endif
  48. /*------ BitMap primitives ------*/
  49. LONG BltBitMap( struct BitMap *srcBitMap, long xSrc, long ySrc,
  50.     struct BitMap *destBitMap, long xDest, long yDest, long xSize,
  51.     long ySize, unsigned long minterm, unsigned long mask,
  52.     PLANEPTR tempA );
  53. void BltTemplate( PLANEPTR source, long xSrc, long srcMod,
  54.     struct RastPort *destRP, long xDest, long yDest, long xSize,
  55.     long ySize );
  56. /*------ Text routines ------*/
  57. void ClearEOL( struct RastPort *rp );
  58. void ClearScreen( struct RastPort *rp );
  59. WORD TextLength( struct RastPort *rp, STRPTR string, unsigned long count );
  60. LONG Text( struct RastPort *rp, STRPTR string, unsigned long count );
  61. LONG SetFont( struct RastPort *rp, struct TextFont *textFont );
  62. struct TextFont *OpenFont( struct TextAttr *textAttr );
  63. void CloseFont( struct TextFont *textFont );
  64. ULONG AskSoftStyle( struct RastPort *rp );
  65. ULONG SetSoftStyle( struct RastPort *rp, unsigned long style,
  66.     unsigned long enable );
  67. /*------    Gels routines ------*/
  68. void AddBob( struct Bob *bob, struct RastPort *rp );
  69. void AddVSprite( struct VSprite *vSprite, struct RastPort *rp );
  70. void DoCollision( struct RastPort *rp );
  71. void DrawGList( struct RastPort *rp, struct ViewPort *vp );
  72. void InitGels( struct VSprite *head, struct VSprite *tail,
  73.     struct GelsInfo *gelsInfo );
  74. void InitMasks( struct VSprite *vSprite );
  75. void RemIBob( struct Bob *bob, struct RastPort *rp, struct ViewPort *vp );
  76. void RemVSprite( struct VSprite *vSprite );
  77. void SetCollision( unsigned long num,
  78.     void (*routine)(struct VSprite *vSprite, APTR),
  79.     struct GelsInfo *gelsInfo );
  80. void SortGList( struct RastPort *rp );
  81. void AddAnimOb( struct AnimOb *anOb, struct AnimOb **anKey,
  82.     struct RastPort *rp );
  83. void Animate( struct AnimOb **anKey, struct RastPort *rp );
  84. BOOL GetGBuffers( struct AnimOb *anOb, struct RastPort *rp, long flag );
  85. void InitGMasks( struct AnimOb *anOb );
  86. /*------    General graphics routines ------*/
  87. void DrawEllipse( struct RastPort *rp, long xCenter, long yCenter, long a,
  88.     long b );
  89. LONG AreaEllipse( struct RastPort *rp, long xCenter, long yCenter, long a,
  90.     long b );
  91. void LoadRGB4( struct ViewPort *vp, UWORD *colors, long count );
  92. void InitRastPort( struct RastPort *rp );
  93. void InitVPort( struct ViewPort *vp );
  94. void MrgCop( struct View *view );
  95. void MakeVPort( struct View *view, struct ViewPort *vp );
  96. void LoadView( struct View *view );
  97. void WaitBlit( void );
  98. void SetRast( struct RastPort *rp, unsigned long pen );
  99. void Move( struct RastPort *rp, long x, long y );
  100. void Draw( struct RastPort *rp, long x, long y );
  101. LONG AreaMove( struct RastPort *rp, long x, long y );
  102. LONG AreaDraw( struct RastPort *rp, long x, long y );
  103. LONG AreaEnd( struct RastPort *rp );
  104. void WaitTOF( void );
  105. void QBlit( struct bltnode *blit );
  106. void InitArea( struct AreaInfo *areaInfo, APTR vectorBuffer,
  107.     long maxVectors );
  108. void SetRGB4( struct ViewPort *vp, long index, unsigned long red,
  109.     unsigned long green, unsigned long blue );
  110. void QBSBlit( struct bltnode *blit );
  111. void BltClear( PLANEPTR memBlock, unsigned long byteCount,
  112.     unsigned long flags );
  113. void RectFill( struct RastPort *rp, long xMin, long yMin, long xMax,
  114.     long yMax );
  115. void BltPattern( struct RastPort *rp, PLANEPTR mask, long xMin, long yMin,
  116.     long xMax, long yMax, unsigned long maskBPR );
  117. ULONG ReadPixel( struct RastPort *rp, long x, long y );
  118. LONG WritePixel( struct RastPort *rp, long x, long y );
  119. BOOL Flood( struct RastPort *rp, unsigned long mode, long x, long y );
  120. void PolyDraw( struct RastPort *rp, long count, WORD *polyTable );
  121. void SetAPen( struct RastPort *rp, unsigned long pen );
  122. void SetBPen( struct RastPort *rp, unsigned long pen );
  123. void SetDrMd( struct RastPort *rp, unsigned long drawMode );
  124. void InitView( struct View *view );
  125. void CBump( struct UCopList *copList );
  126. void CMove( struct UCopList *copList, APTR destination, long data );
  127. void CWait( struct UCopList *copList, long v, long h );
  128. LONG VBeamPos( void );
  129. void InitBitMap( struct BitMap *bitMap, long depth, long width, long height );
  130. void ScrollRaster( struct RastPort *rp, long dx, long dy, long xMin, long yMin,
  131.     long xMax, long yMax );
  132. void WaitBOVP( struct ViewPort *vp );
  133. WORD GetSprite( struct SimpleSprite *sprite, long num );
  134. void FreeSprite( long num );
  135. void ChangeSprite( struct ViewPort *vp, struct SimpleSprite *sprite,
  136.     PLANEPTR newData );
  137. void MoveSprite( struct ViewPort *vp, struct SimpleSprite *sprite, long x,
  138.     long y );
  139. void LockLayerRom( struct Layer *layer );
  140. void UnlockLayerRom( struct Layer *layer );
  141. void SyncSBitMap( struct Layer *layer );
  142. void CopySBitMap( struct Layer *layer );
  143. void OwnBlitter( void );
  144. void DisownBlitter( void );
  145. struct TmpRas *InitTmpRas( struct TmpRas *tmpRas, PLANEPTR buffer,
  146.     long size );
  147. void AskFont( struct RastPort *rp, struct TextAttr *textAttr );
  148. void AddFont( struct TextFont *textFont );
  149. void RemFont( struct TextFont *textFont );
  150. PLANEPTR AllocRaster( unsigned long width, unsigned long height );
  151. void FreeRaster( PLANEPTR p, unsigned long width, unsigned long height );
  152. void AndRectRegion( struct Region *region, struct Rectangle *rectangle );
  153. BOOL OrRectRegion( struct Region *region, struct Rectangle *rectangle );
  154. struct Region *NewRegion( void );
  155. BOOL ClearRectRegion( struct Region *region, struct Rectangle *rectangle );
  156. void ClearRegion( struct Region *region );
  157. void DisposeRegion( struct Region *region );
  158. void FreeVPortCopLists( struct ViewPort *vp );
  159. void FreeCopList( struct CopList *copList );
  160. void ClipBlit( struct RastPort *srcRP, long xSrc, long ySrc,
  161.     struct RastPort *destRP, long xDest, long yDest, long xSize,
  162.     long ySize, unsigned long minterm );
  163. BOOL XorRectRegion( struct Region *region, struct Rectangle *rectangle );
  164. void FreeCprList( struct cprlist *cprList );
  165. struct ColorMap *GetColorMap( long entries );
  166. void FreeColorMap( struct ColorMap *colorMap );
  167. ULONG GetRGB4( struct ColorMap *colorMap, long entry );
  168. void ScrollVPort( struct ViewPort *vp );
  169. struct CopList *UCopperListInit( struct UCopList *uCopList, long n );
  170. void FreeGBuffers( struct AnimOb *anOb, struct RastPort *rp, long flag );
  171. void BltBitMapRastPort( struct BitMap *srcBitMap, long xSrc, long ySrc,
  172.     struct RastPort *destRP, long xDest, long yDest, long xSize,
  173.     long ySize, unsigned long minterm );
  174. BOOL OrRegionRegion( struct Region *srcRegion, struct Region *destRegion );
  175. BOOL XorRegionRegion( struct Region *srcRegion, struct Region *destRegion );
  176. BOOL AndRegionRegion( struct Region *srcRegion, struct Region *destRegion );
  177. void SetRGB4CM( struct ColorMap *colorMap, long index, unsigned long red,
  178.     unsigned long green, unsigned long blue );
  179. void BltMaskBitMapRastPort( struct BitMap *srcBitMap, long xSrc, long ySrc,
  180.     struct RastPort *destRP, long xDest, long yDest, long xSize,
  181.     long ySize, unsigned long minterm, PLANEPTR bltMask );
  182. BOOL AttemptLockLayerRom( struct Layer *layer );
  183. /*--- functions in V36 or higher (distributed as Release 2.0) ---*/
  184. APTR GfxNew( unsigned long gfxNodeType );
  185. void GfxFree( APTR gfxNodePtr );
  186. void GfxAssociate( APTR associateNode, APTR gfxNodePtr );
  187. void BitMapScale( struct BitScaleArgs *bitScaleArgs );
  188. UWORD ScalerDiv( unsigned long factor, unsigned long numerator,
  189.     unsigned long denominator );
  190. WORD TextExtent( struct RastPort *rp, STRPTR string, long count,
  191.     struct TextExtent *textExtent );
  192. ULONG TextFit( struct RastPort *rp, STRPTR string, unsigned long strLen,
  193.     struct TextExtent *textExtent, struct TextExtent *constrainingExtent,
  194.     long strDirection, unsigned long constrainingBitWidth,
  195.     unsigned long constrainingBitHeight );
  196. APTR GfxLookUp( APTR associateNode );
  197. BOOL VideoControl( struct ColorMap *colorMap, struct TagItem *tagarray );
  198. struct MonitorSpec *OpenMonitor( STRPTR monitorName,
  199.     unsigned long displayID );
  200. BOOL CloseMonitor( struct MonitorSpec *monitorSpec );
  201. DisplayInfoHandle FindDisplayInfo( unsigned long displayID );
  202. ULONG NextDisplayInfo( unsigned long displayID );
  203. ULONG GetDisplayInfoData( DisplayInfoHandle handle, UBYTE *buf,
  204.     unsigned long size, unsigned long tagID, unsigned long displayID );
  205. void FontExtent( struct TextFont *font, struct TextExtent *fontExtent );
  206. LONG ReadPixelLine8( struct RastPort *rp, unsigned long xstart,
  207.     unsigned long ystart, unsigned long width, UBYTE *array,
  208.     struct RastPort *tempRP );
  209. LONG WritePixelLine8( struct RastPort *rp, unsigned long xstart,
  210.     unsigned long ystart, unsigned long width, UBYTE *array,
  211.     struct RastPort *tempRP );
  212. LONG ReadPixelArray8( struct RastPort *rp, unsigned long xstart,
  213.     unsigned long ystart, unsigned long xstop, unsigned long ystop,
  214.     UBYTE *array, struct RastPort *temprp );
  215. LONG WritePixelArray8( struct RastPort *rp, unsigned long xstart,
  216.     unsigned long ystart, unsigned long xstop, unsigned long ystop,
  217.     UBYTE *array, struct RastPort *temprp );
  218. LONG GetVPModeID( struct ViewPort *vp );
  219. LONG ModeNotAvailable( unsigned long modeID );
  220. WORD WeighTAMatch( struct TextAttr *reqTextAttr,
  221.     struct TextAttr *targetTextAttr, struct TagItem *targetTags );
  222. void EraseRect( struct RastPort *rp, long xMin, long yMin, long xMax,
  223.     long yMax );
  224. ULONG ExtendFont( struct TextFont *font, struct TagItem *fontTags );
  225. void StripFont( struct TextFont *font );
  226. #endif     /* CLIB_GRAPHICS_PROTOS_H */
  227.